/**
 * @project readnote
 * @Title ExpostulationService.java
 * @author huxh
 * @date 2012-2-12
 **/
package com.readnote.expostulation.service;

import java.util.Collection;
import java.util.Date;

import com.cr.backbone.hibenate.AppBaseService;
import com.readnote.expostulation.model.Expostulation;
import com.readnote.user.model.User;

public interface ExpostulationService extends AppBaseService<Expostulation> {

	/**
	 * 保存励志谏言
	 * 插入、更新励志谏言记录
	 * @methodDescribe
	 * @param expostulation
	 * @param user
	 * @param applyDate
	 * @return
	 * @author xianghua.hu
	 * @date 2012-3-6 下午04:49:23
	 */
	public Long saveExpostulation(Expostulation expostulation, User user,
			Date applyDate);
	
	
	/**
	 * 获取某个用户最新发布的谏言
	 * @methodDescribe
	 * @param user
	 * @return
	 * @author xianghua.hu
	 * @date 2012-3-6 下午05:16:25
	 */
	public Expostulation getExpostulationTopOneByCreateDateDesc(User user);


	/**
	 * 根据用户获取检验，根据创建时间倒序
	 * @methodDescribe
	 * @author xianghua.hu
	 * @date 2012-5-16 
	 */
	public Collection<Expostulation> getListExpostulationByUserOrderCreateDateDesc(User user);
	
}
